<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ManageLocations.aspx.vb" Inherits="Default2" title="GTS Frieght Management System" MaintainScrollPositionOnPostback="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">

<h3>Add Rate Location</h3>
    <asp:Literal ID="Message" runat="server"></asp:Literal>
    <table>
        <tr>
            <td>City:</td>
            <td style="width: 183px"><asp:TextBox ID="txtCity" runat="server"></asp:TextBox>
                </td>
        </tr>
        <tr>
            <td>Province/State:</td>
            <td style="width: 183px"><asp:TextBox ID="txtProv" runat="server"></asp:TextBox>
                </td>
        </tr>
        <tr>
            <td>Country:</td>
            <td style="width: 183px"><asp:TextBox ID="txtCountry" runat="server"></asp:TextBox>
                </td>
        </tr>  
        <tr>  
        <td>
            <asp:LinkButton ID="lbtnAdd" runat="server" Width="49px">Add</asp:LinkButton></td>
        <td style="width: 183px; text-align: right">
            </td>
        </tr>
    </table>
    <br />
    <asp:GridView ID="GridRateLocations" runat="server" AutoGenerateColumns="False" Caption="Locations in Database"
        CaptionAlign="Top" CellPadding="4" DataSourceID="RateLocationsSource" ForeColor="#333333"
        GridLines="None" Width="100%" DataKeyNames="RateLocationID">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:BoundField DataField="RateLocationID" HeaderText="RateLocationID" InsertVisible="False"
                ReadOnly="True" SortExpression="RateLocationID" Visible="False" />
            <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
            <asp:BoundField DataField="Province" HeaderText="Province" SortExpression="Province" />
            <asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" />
        </Columns>
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
        <EditRowStyle BackColor="#999999" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <asp:ObjectDataSource ID="RateLocationsSource" runat="server" InsertMethod="AddRateLocation"
        OldValuesParameterFormatString="{0}" SelectMethod="GetRateLocation"
        TypeName="GTSSystem.BLL.RateLocation" UpdateMethod="UpdateRateLocation">
        <UpdateParameters>
            <asp:Parameter Name="RateLocationID" Type="Int32" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="Province" Type="String" />
            <asp:Parameter Name="Country" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ProfileParameter Name="BranchID" PropertyName="BranchId" Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="BranchID" Type="Int32" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="Province" Type="String" />
            <asp:Parameter Name="Country" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>


</asp:Content>

